﻿using System.Windows.Forms;
using Wpf.Ui;
using Wpf.Ui.Controls;
using Wpf.Ui.Abstractions;

namespace MetaView.Shell.Views;

/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : FluentWindow
{
    public MainWindow(IRegionManager regionManager) //IRegionManager regionManager)
    {

        //Appearance.SystemThemeWatcher.Watch(this);

        InitializeComponent();

        //this.Loaded += this.MainWindow_Loaded;
        //regionManager.AddRoot("mainRoot", this.contentRoot);
    }

    private async void MainWindow_Loaded(object sender, RoutedEventArgs e)
    {
        //await Task.Run(async () =>
        //{
        //    //模拟耗时操作
        //    for (var i = 0; i < 1000; i++)
        //    {
        //        Debug.WriteLine(i);
        //    }

        //    //切换到主线程
        //    await MainThreadTaskFactory.SwitchToMainThreadAsync();

        //    //更新UI
        //    this.Title = "Hello";
        //});
    }
}